import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/views/Index.vue'),

    },
      {
        path: '/controller',
        component: () => import('@/component/ControllerPanel.vue'),
        redirect:'/controller/route',
        children: [
          {path:'requestLog',name:'请求日志',component:()=>import('@/views/gateWayView/requestLog.vue')},
          {path:'traffic',name:'流量统计页面',component:()=>import('@/views/gateWayView/traffic.vue')},
          {path:'route',name:'路由管理和配置页面',component:()=>import('@/views/gateWayView/routes.vue')},
        ]
      },
  ]
})

export default router
